package com.ruoyi.bnt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bnt.mapper.BntWorshipinfoMapper;
import com.ruoyi.bnt.domain.BntWorshipinfo;
import com.ruoyi.bnt.service.IBntWorshipinfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 序乐、回应详情Service业务层处理
 * 
 * @author yyj
 * @date 2020-09-24
 */
@Service
public class BntWorshipinfoServiceImpl implements IBntWorshipinfoService 
{
    @Autowired
    private BntWorshipinfoMapper bntWorshipinfoMapper;

    /**
     * 查询序乐、回应详情
     * 
     * @param id 序乐、回应详情ID
     * @return 序乐、回应详情
     */
    @Override
    public BntWorshipinfo selectBntWorshipinfoById(String id)
    {
        return bntWorshipinfoMapper.selectBntWorshipinfoById(id);
    }

    /**
     * 查询序乐、回应详情列表
     * 
     * @param bntWorshipinfo 序乐、回应详情
     * @return 序乐、回应详情
     */
    @Override
    public List<BntWorshipinfo> selectBntWorshipinfoList(BntWorshipinfo bntWorshipinfo)
    {
        return bntWorshipinfoMapper.selectBntWorshipinfoList(bntWorshipinfo);
    }

    /**
     * 新增序乐、回应详情
     * 
     * @param bntWorshipinfo 序乐、回应详情
     * @return 结果
     */
    @Override
    public int insertBntWorshipinfo(BntWorshipinfo bntWorshipinfo)
    {
        bntWorshipinfo.setCreateTime(DateUtils.getNowDate());
        return bntWorshipinfoMapper.insertBntWorshipinfo(bntWorshipinfo);
    }

    /**
     * 修改序乐、回应详情
     * 
     * @param bntWorshipinfo 序乐、回应详情
     * @return 结果
     */
    @Override
    public int updateBntWorshipinfo(BntWorshipinfo bntWorshipinfo)
    {
        bntWorshipinfo.setUpdateTime(DateUtils.getNowDate());
        return bntWorshipinfoMapper.updateBntWorshipinfo(bntWorshipinfo);
    }

    /**
     * 删除序乐、回应详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBntWorshipinfoByIds(String ids)
    {
        return bntWorshipinfoMapper.deleteBntWorshipinfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除序乐、回应详情信息
     * 
     * @param id 序乐、回应详情ID
     * @return 结果
     */
    @Override
    public int deleteBntWorshipinfoById(String id)
    {
        return bntWorshipinfoMapper.deleteBntWorshipinfoById(id);
    }
}
